import store from './store/index.js'
import router from './router.js'
import App from './app.vue'
import './assets/base.scss'

// 创建vue3的实例
let app = Vue.createApp(App)

window.__QIANKUN_SUB_APP_VM__ = app


window.devInit = (props = {}) => {
  const { container } = props;
  app.use(store)
  .use(router)
  .use(ElementPlus)
  .mount(container ? container : '#app')
};

// 非乾坤环境走这里初始化
if (!window.__POWERED_BY_QIANKUN__) {
  devInit();
}

if (window.__POWERED_BY_QIANKUN__) {
  // eslint-disable-next-line no-undef
  __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__+`dev/`
}
